/*
Kane and Anson
"Deficit Attention Disorder"
Political Behavior

Replication Files For:  Figure A1

*/

*Figure A1:  Top Panel
*Data Source:  https://fred.stlouisfed.org/series/GFDEGDQ188S

use "FigA1_Top_TotalPublicDebt_pctGDP.dta", clear

twoway (area RD_admin2 dateq2, fcolor(538b%50) lcolor(538b)) ///
(tsline GFDEGDQ188S, lstyle(solid) lcolor(black) lwidth(medthick)), ///
ytitle("Total Public Debt as % of GDP") ///
xtitle("Year") ///
tlabel(, labsize(small) angle(forty_five) valuelabel) ///
legend(off) ///
xtick(1973(.25)2020) ///
xlabel(1973(2)2019, angle(forty_five) grid) /// 
ylabel(0(10)110)  xsize(6.5) ysize(3.8) ///
graphregion(margin(vsmall)) scheme(plotplain) 


*Figure A1:  Bottom Panel
*Data Source:  https://fred.stlouisfed.org/series/FYFSGDA188S
use "FigA1_Bottom_DeficitData.dta", clear
net install ciplot, from("http://fmwww.bc.edu/RePEc/bocode/c") // install ciplot graph package

ciplot fyfsgda188s, by(PresidentParty) note("") ylabel(-5(1)0) yline(0) ///
ytitle("Average Annual Deficit / Surplus as % of GDP" "(1973-2019)", size(medium)) ///
scheme(plotplain) ///
mcolor(black) msymbol(circle_hollow) rcapopts(color(black)) ///
xtitle("") 
*Note: Additional minor edits were manually made to the graph for aesthetic purposes

*Testing for Significant Differences Between Party (cited in Figure A1 notes)
reg fyfsgda188s i.PresidentParty, vce(cluster President) // SEs clustered by presidency
